stopword = ''
str1 = ''
for line in iter(input, stopword):
    str1 += line
    if "E" in line:
        break


def shiyi(x):
    cout1, cout2 = 0, 0
    for i in range(len(x)):
        if str1[i] == "W":
            cout1 += 1
        elif str1[i] == "L":
            cout2 += 1
        elif str1[i] == "E":
            print("%s:%s" % (cout1, cout2))
            return
        if (cout1 == 11 and cout2 < 10) or (cout2 == 11 and cout1 < 10):
            print("%s:%s" % (cout1, cout2))
            cout1, cout2 = 0, 0
        if cout1 > 9 and cout2 > 9 and (cout2 - cout1 > 1 or cout1 - cout2 > 1):
            print("%s:%s" % (cout1, cout2))
            cout1, cout2 = 0, 0


def eryi(x):
    cout1, cout2 = 0, 0
    for i in range(len(x)):
        if str1[i] == "W":
            cout1 += 1
        elif str1[i] == "L":
            cout2 += 1
        elif str1[i] == "E":
            print("%s:%s" % (cout1, cout2))
            return
        if (cout1 == 21 and cout2 < 20) or (cout2 == 21 and cout1 < 20):
            print("%s:%s" % (cout1, cout2))
            cout1, cout2 = 0, 0
        if cout1 > 19 and cout2 > 19 and (cout2 - cout1 > 1 or cout1 - cout2 > 1):
            print("%s:%s" % (cout1, cout2))
            cout1, cout2 = 0, 0


shiyi(str1)
print("")
eryi(str1)
